home *** CD-ROM | disk | FTP | other *** search
-
-
- creature flake
- {
- int ran
- int dsize
- int remX, remY
-
- if (cnew)
- {
- dsize=Random(4)
- remX=cx
- remY=cy
- }
-
- ran=Random(10)
- cx=ran-5+cdx+cx
- cy=Random(5)+cdy+cy
-
- if (cx < 0 || cx > 319 || cy < 0 || cy > 199)
- {
- ran=Random(10)
- cx=remX+ran-5
- cy=remY+Random(5)
- }
- Circle(cx, cy,dsize, 15)
- }
-
-
-
-
- function generate()
- {
- int i
- int initX,initY, initxSpeed,initySpeed
- i = 0
-
- loop
- {
- initX=Random(319)
- initY=Random(19)
- initxSpeed=Random(10)
- initySpeed=Random(10)
- Spawn(flake, initX, initY, initxSpeed, initySpeed)
- i = (i+1)
- if (i > 30)
- {
- break;
- }
- }
- }
-
-
-
-
- ToGraphics() ;Switch to graphics mode
- PreSwap() ;Set up double buffering
- SetColor(15,200,200,200)
-
- generate()
-
- loop
- {
- ClearScreen()
- Evolve()
- Swap()
- }
-